package com.czl.elm.controller;


import com.czl.elm.domain.Menu;
import com.czl.elm.service.IMenuService;
import com.czl.elm.util.ActionResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zuoleiChen
 * @since 2021-05-19
 */
@RestController
@RequestMapping("/menu")
public class MenuController {

    @Autowired
    private IMenuService menuService;

    @ApiOperation(value = "获取相应菜单")
    @PostMapping("/{identity}/{parentid}")
    public ActionResult selectMenu(@PathVariable Integer parentid,@PathVariable String identity){
        return menuService.selectMenu(parentid,identity);
    }

}
